<template>
  <div class="ad_content2">
    <div class="title_h1">企业介绍</div>
    <div class="fuwenben_box">
      <WenbenCom @getContent="getContent" :rfuwenben="rfuwenben"></WenbenCom>
    </div>
    <el-button @click="subData" type="warning" class="sub_btn">提交</el-button>
  </div>
</template>

<script>
import WenbenCom from "@components/wenbenCom";
import { Message } from 'element-ui';
export default {
  components: {
    WenbenCom
  },
  data() {
    return {
      fuwenben:"",
      rfuwenben:""
    };
  },
  beforeMount(){
    this.$getApi("/common/qiyejianjie",{}).then(res=>{
      console.log(res) 
      this.rfuwenben = res.data ? res.data.content : ""
      // this.dataList = res.data; 
    })
  },
  methods: {
    subData(){
      console.log(this.fuwenben)
      let dataL = {
        content:this.fuwenben
      }
      console.log(dataL)

      this.$postApi("/common/qiyejianjie",dataL).then(res=>{
        console.log(res) 
        Message({
            type: "success",
            message: '提交成功',
            showClose: true
        });
        // this.dataList = res.data; 
      })
    },
    getContent(val){
      // console.log(val)
      this.fuwenben = val
    }
  },
};
</script>

<style scoped lang="stylus">
.ad_content2{
  background-color #fff
  padding-bottom 30px
  .fuwenben_box{
    padding 10px
  }
  .sub_btn{
    display block
    width 300px;
    margin 30px auto 20px
  }
  .title_h1{
    // text-align center;
    color #004173
    font-size 26px
    padding 20px 0 10px  60px 
    border-bottom 1px solid #f0f0f0
  }
  .hang_msg{
    display flex;
    align-items center
    padding 20px 0 10px 0
    font-size 16px
    .left_title{
      width 260px
      text-align right
      padding-right 8px
      color #004173
    }
    .right_input{
      width 360px  
    }
  }
}
</style>
